﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<TITLE>添加联系人</TITLE> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${pageContext.request.contextPath }/css/Style.css" type=text/css rel=stylesheet>
<LINK href="${pageContext.request.contextPath }/css/Manage.css" type=text/css
	rel=stylesheet>

<script src="${pageContext.request.contextPath }/laydate/laydate.js"></script>
<META content="MSHTML 6.00.2900.3492" name=GENERATOR>
</HEAD>
<BODY onload="setSelected()">
	<FORM id=form1 name=form1 
		action="${pageContext.request.contextPath }/visit_update.action"
		method=post>
		<input type="hidden" name="linkman.lkm_id" value="${linkMan.lkm_id }"/>

		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_019.jpg"
						border=0></TD>
					<TD width="100%" background="${pageContext.request.contextPath }/images/new_020.jpg"
						 height=20></TD>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_021.jpg"
						border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15 background=${pageContext.request.contextPath }/images/new_022.jpg><IMG
						src="${pageContext.request.contextPath }/images/new_022.jpg" border=0></TD>
					<TD vAlign=top width="100%" bgColor=#ffffff>
						<TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
							<TR>
								<TD class=manageHead>当前位置：联系人管理 &gt; 修改联系人</TD>
							</TR>
							<TR>
								<TD height=2></TD>
							</TR>
						</TABLE>
						<TABLE cellSpacing=0 cellPadding=5  border=0>
							<tr>
								<td>所属客户：</td>
 								<td style="WIDTH: 180px" maxLength=50>
 								<select  name="customer.cust_id"  id="selectid"   >
                            	<c:forEach items="${list}" var="l" >										
										<option value="${l.cust_id }" >${l.cust_name }</option>							</c:forEach>
                        		</select>
                        		<input type="hidden" id="zhiding" value="${visit.customer.cust_id }"/>
                        		<input type="hidden" name="visit_id" value="${visit.visit_id }"/>
 								</td>
 								<td>被拜访人姓名：</td>
								<td>
								<INPUT class=textbox id=sChannel2
														style="WIDTH: 180px" maxLength=50 name="visit_interviewee" value="${visit.visit_interviewee}" >
								</td>
 								
							</tr>
							<TR>
								<td>拜访时间：</td>
								<td>
								<INPUT class=textbox id=time
														style="WIDTH: 180px" maxLength=50 name="visit_time" value="${visit.visit_time}" >
								</td>
								<td>下次拜访时间：</td>
								<td>
								<INPUT class=textbox id=time1
														style="WIDTH: 180px" maxLength=50 name="visit_nexttime" value="${visit.visit_nexttime}" >						
								</td>
							</TR>
							<TR>
								<td>拜访地点：</td>
								<td>
								<INPUT class=textbox id=sChannel2
														style="WIDTH: 180px" maxLength=50 name="visit_addr" value="${visit.visit_addr}">
								</td>
								<td>拜访详情 ：</td>
								<td>
								<INPUT class=textbox id=sChannel2
														style="WIDTH: 180px" maxLength=50 name="visit_detail" value="${visit.visit_detail}">
								</td>
							</TR>
							<tr>
								<td rowspan=2>
								<INPUT class=button id=sButton2 type=submit
														value="保存 " name=sButton2>
								</td>
							</tr>
						</TABLE>
						
						
					</TD>
					<TD width=15 background="${pageContext.request.contextPath }/images/new_023.jpg">
					<IMG src="${pageContext.request.contextPath }/images/new_023.jpg" border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
		<TABLE cellSpacing=0 cellPadding=0 width="98%" border=0>
			<TBODY>
				<TR>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_024.jpg"
						border=0></TD>
					<TD align=middle width="100%"
						background="${pageContext.request.contextPath }/images/new_025.jpg" height=15></TD>
					<TD width=15><IMG src="${pageContext.request.contextPath }/images/new_026.jpg"
						border=0></TD>
				</TR>
			</TBODY>
		</TABLE>
	</FORM>
</BODY>
<script type="text/javascript">
function setSelected() {
    var oldType = document.getElementById("zhiding").value;
    var types = document.getElementById("selectid");
//     window.confirm(oldType);
//     window.confirm(types.options[1].value);
    for ( var i = 0; i < types.options.length; i++) {
        if (types.options[i].value == oldType) {        
            types.options[i].selected = true;
        }
    }
}
laydate.render({
	elem: '#time' //指定元素
	});

	laydate.render({
		elem: '#time1' //指定元素
		});
</script>
</HTML>
